package details;

/**
 * @author Tami
 *
 */
public class Track {
	
	private String 	title;
	private String 	artist;
	private int		lengthInsec;
	private	int		trackNum;
	private String disk_id;/*disk-id+genreid*/
	private int song_id;
	
	public Track(String disk_id, int trackNum,String title,String artist,int lengthInsec,int song_id) {
		
		this.setDisk_id(disk_id);
		this.trackNum = trackNum;
		this.title = title;
		this.setArtistName(artist);
		this.setLengthSdc(lengthInsec);
		this.setSong_id(song_id);
	}
	
	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getArtistName() {
		return artist;
	}
	
	
	
	public void setArtistName(String artist) {
		this.artist = artist;
	}
	
	
	public int getLengthInSec() {
		return lengthInsec;
	}
	
	public void setLengthSdc(int lengthInsec) {
		this.lengthInsec = lengthInsec;
	}
	
	
	public int getTrackNum() {
		return trackNum;
	}
	public void setTrackNum(int trackNum) {
		this.trackNum = trackNum;
	}
	
	public	boolean	hasArtist()
	{
		return ((this.artist != null)&& (!this.artist.isEmpty() ));
	}		
	

	
	public	String	toString()
	{
		String toS = this.trackNum + ". Title: " + this.title;

		if (this.artist != null)
		{
			toS += "   Artist: " + this.artist;
		}
		else
		{
			toS += "   Artist: " + "N/A ";
		}

		toS += "   length: " + this.lengthInsec + " seconds\n ";
		return toS;
	}

	public String getDisk_id() {
		return disk_id;
	}

	public void setDisk_id(String disk_id) {
		this.disk_id = disk_id;
	}

	public int getSong_id() {
		return song_id;
	}

	public void setSong_id(int song_id) {
		this.song_id = song_id;
	}


}
